using UnityEngine;
using System.Collections;

public class  Rede : MonoBehaviour {
	
	public Transform trans;
	private bool descendo;
	private bool subindo;
	
	// Use this for initialization
	void Start () {
		
		descendo = false;
		subindo = false;

	}
	
	// Update is called once per frame
	void Update () {
		float trans = Time.deltaTime*0.5f;
		this.transform.Translate(0, trans, 0);
		if(descendo&&!subindo)
		{
			transform.position = Vector3.Lerp(new Vector3(0, 0, 0), new Vector3(0, -3, 0), Time.time );
		}
        if (Input.GetKeyDown(KeyCode.X))
		{
			descendo = true;
			subindo = false;
		}
	}
}
